package main.Q2501_2600;

import java.util.Arrays;

public class Q2501_2510 {
	public static void main(String[] args) {
		System.out.println("Question2501：");
		System.out.println("Question2502：");
		System.out.println("Question2503：");
		System.out.println("Question2504：");
		System.out.println("Question2505：");
		System.out.println("Question2506：统计相似字符串对的数目");
		System.out.println("Question2507：");
		System.out.println("Question2508：");
		System.out.println("Question2509：");
		System.out.println("Question2510：");
	}
}

class Question2506{
	public int similarPairs(String[] words) {
		int result = 0;
		int len = words.length;
		int [][]arr = new int [len][26];
		for(int i = 0;i < len;i++) {
			for(char a : words[i].toCharArray()) {
				arr[i][a - 'a'] = 1;
			}
		}
		for(int i = 0;i < len;i++) {
			for(int j = i + 1;j < len;j++) {
				if(Arrays.equals(arr[i],arr[j])) result++;
			}
		}
		return result;
	}
}